Skip to content

Conversation

@febo
Copy link
Contributor

@febo febo commented Oct 30, 2024

This PR adds a new IdlType variant to represent Codama IDLs on the include-idl crate.

The way the IDL is stored was also refactored to include its type in a separate section:

  • .idl.type: type of the IDL (bytes of "anchor" or "codama")
  • .idl.data: compressed data of the IDL file

The CLI was updated to retrieve the IDL under the standard section headers:

$ include-idl-cli parse ../programs/.bin/asset_program.so`

Program IDL (codama)
============================
{"additionalPrograms":[],"kind":"rootNode","program":{"accounts":[{"data":
{"fields":[{"docs":[],"kind":"structFieldTypeNode","name":"discriminator","type":
{"kind":"definedTypeLinkNode","name":"discriminator"}},{"docs":[],"kind"
...

@febo febo marked this pull request as ready for review October 30, 2024 16:27
@febo febo merged commit a5a95ea into main Oct 31, 2024
16 of 19 checks passed
@febo febo deleted the febo/codama-idl-type branch October 31, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants